import requests

# resp = cxk.请求方法(url='url地址',params={k:v},header={k:v},data={k:v},json={k:v},cookies='content')
'''
url : string
params 查询参数 
header 请求头
data 表单格式的请求体
json json格式的请求体
cookies string
'''

# response = cxk.get('http://www.baidu.com')
# # 状态码
# print(response.status_code)
# # 响应文本
# response.encoding = 'UTF-8'
# print(response.text)

# response = cxk.get('http://www.baidu.com/s?wd=武汉天气')
body = {"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
        "Cookie": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"}
response = requests.get('http://www.baidu.com/s', params={"kw": "武汉天气"})
response.encoding = 'utf-8'
print(response.text)
